<?php

namespace App\Models\Recommend;

use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class MuticolumnReclist0Data
 * @package App\Models\Recommend
 * @version July 19, 2018, 2:34 pm CST
 *
 * @property \App\Models\Recommend\Muticolumn muticolumn
 * @property \App\Models\Recommend\Meta meta
 * @property \App\Models\Recommend\Data data
 * @property string name
 * @property string title
 * @property string subtitle
 * @property integer muticolumn_id
 * @property integer meta_id
 * @property integer data_id
 * @property integer resource_data_id
 * @property string onclick
 * @property string tags
 * @property string img
 */
class MuticolumnReclist0Data extends Model
{
    use SoftDeletes;


    public $table = 'muticolumn_reclist0_datas';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'name',
        'title',
        'subtitle',
        'muticolumn_id',
        'meta_id',
        'data_id',
        'resource_data_id',
        'onclick',
        'tags',
        'img'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'name' => 'string',
        'title' => 'string',
        'subtitle' => 'string',
        'muticolumn_id' => 'integer',
        'meta_id' => 'integer',
        'data_id' => 'integer',
        'resource_data_id' => 'integer',
        'onclick' => 'string',
        'tags' => 'string',
        'img' => 'string'
    ];

    /**
     * Validation rules
     *
     * @var array
     */
    public static $rules = [
        
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     **/
    public function muticolumn()
    {
        return $this->hasOne(\App\Models\Application\Muticolumn::class, 'id', 'muticolumn_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     **/
    public function meta()
    {
        return $this->hasOne(\App\Models\Operation\Meta::class, 'id', 'meta_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     **/
    public function data()
    {
        return $this->hasOne(\App\Models\Entity\Column\Data::class, 'id', 'data_id');
    }
}
